#include <iostream>

using namespace std;
void change(int *a, int *b, int *c);
int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        int a, b, c;
        cin >> a >> b >> c;
        change(&a, &b, &c);
        cout << a << " " << b << " " << c << endl;
    }

    return 0;
}

void change(int *a, int *b, int *c)
{
    int p;
    if (*a < *b)
    {
        p = *a;
        *a = *b;
        *b = p;
    }
    if (*a < *c)
    {
        p = *a;
        *a = *c;
        *c = p;
    }
    if (*b < *c)
    {
        p = *b;
        *b = *c;
        *c = p;
    }
}